package com.xd.pre.modules.tpshop.service.impl;

import com.xd.pre.modules.tpshop.service.IViewSpproductattributeBiz;
import org.springframework.transaction.annotation.Transactional;

@Transactional
public class ViewSpproductattributeBiz implements IViewSpproductattributeBiz {
//	@Resource(name="ViewSpproductattributeDAO")
//	private ViewSpproductattributeDAO v_pa_dao;
//
//
//	@Transactional(propagation=Propagation.NOT_SUPPORTED)
//	@Override // 查找某个商品 所拥有的 说有属性list
//	public List<ViewSpproductattribute> find_proAttri_byGoodsId(int goodsId) {
//		return v_pa_dao.find_proAttri_byGoodsId(goodsId);
//	}

}

/*
 public List<ViewSpproductattribute> find_proAttri_byGoodsId(int goodsId){
	//	SELECT *FROM view_SPProductAttribute vsa WHERE vsa.`goods_id`=?
	String sql="SELECT *FROM view_SPProductAttribute vsa WHERE vsa.`goods_id`=?";// "SELECT *FROM view_SPProductAttribute vsa WHERE vsa.`goods_id`=?"
	Query query=getSession().createSQLQuery(sql); //.createQuery(hql);  createSQLQuery(sql)
	query.setParameter(0, goodsId);

	if(query.list()!=null && !query.list().isEmpty()){
		return query.list();
	}

	return null;
}
 */
